import { post } from './request'

// 用户相关
export function getUserList(data) {
  return post('/user/list', data)
}
export function createUser(data) {
  return post('/user/create', data)
}

// 菜单相关
export function getTodayMenu(data) {
  return post('/menu/today', data)
}
export function getHistoryMenu(data) {
  return post('/menu/history', data)
}

// 订单相关
export function getOrderPage(data) {
  return post('/api/order/page', data)
}
export function getOrderDetail(data) {
  return post('/api/order/detail', data)
}
export function refundOrder(data) {
  return post(`/api/order/refund/${data.orderNo}`, {})
}

export function initOrderData() {
  return post('/api/order/init', {})
}

// 可在此添加订单相关接口 

export function addDish(data) {
  return post('/api/dish/save', data)
}

export function updateDish(data) {
  return post('/api/dish/update', data)
}

export function deleteDish(data) {
  return post('/api/dish/delete', data)
}

export function getDishPage(data) {
  return post('/api/dish/page', data)
} 